<template>
	<view class="content">
		<text style="font-size: 50rpx ;">子组件A</text>
		<view>
			<text>父组件传进来的值：</text>
			<text style="font-weight: bold;color:red">{{intent}}</text>
		</view>
		<button type="primary" @click="sendData()">传值给B组件</button>
	</view>
</template>

<script>
	export default {
		name:"comA",
		props:['intent'],
		data() {
			return {
				
			};
		},
		mounted() {
			console.log("comA---mouted");
		},
		methods:{
			sendData(){
				console.log("comA---sendData");
				uni.$emit('sendIntent',this.intent)
			}
		}
	}
</script>

<style>

</style>